import yunRequest from "./api";

const baseUrl = getApp().globalData.apiBaseUrl;

// 通过建议ID查询建议和处理结果
export function getResultsByAdviseId(aid) {
    let url = baseUrl + "/results/getResultsByAdviseId"
    return yunRequest.post(url, {
        aid
    });
}

// 上传处理结果
export function uploadResults(aid, content, phone, name, imgList) {
    let url = baseUrl + "/results/uploadResults"
    return yunRequest.post(url, {
        aid,
        content,
        phone,
        name,
        imgList
    });
}

// 驳回处理结果
export function rejectedResults(id, aid, reason) {
    let url = baseUrl + "/results/rejectedResults"
    return yunRequest.post(url, {
        id,
        aid,
        reason
    });
}

// 通过处理结果
export function passResults(aid) {
    let url = baseUrl + "/results/passResults"
    return yunRequest.post(url, {
        aid
    });
}